package com.restkeeper.store.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 挂账单位管理
 * </p>
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="Credit", description="挂账")
@TableName(value = "t_credit")
public class Credit extends BaseStoreEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @ApiModelProperty(value = "挂账id")
    @TableId(value = "credit_id", type = IdType.ASSIGN_ID)
    private String creditId;

    /**
     * 挂账类型 1 公司 2 个人
     */
    @ApiModelProperty(value = "挂账类型")
    @TableField(value = "credit_type")
    private Integer creditType;

    /**
     * 挂账公司名称
     */
    @ApiModelProperty(value = "挂账公司名称")
    @TableField(value = "company_name")
    private String companyName;

    /**
     * 用户名称
     */
    @ApiModelProperty(value = "用户名称")
    @TableField(value = "user_name")
    private String userName;

    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号")
    private String phone;

    /**
     * 状态 1 开启 0 停用
     */
    @ApiModelProperty(value = "挂账状态")
    private Integer status;

    /**
     * 挂账金额
     */
    @ApiModelProperty(value = "挂账金额")
    @TableField(value = "credit_amount")
    private Integer creditAmount;

    /**
     * 总还款金额
     */
    @ApiModelProperty(value = "总还款金额")
    @TableField(value = "total_repayment_ammount")
    private Integer totalRepaymentAmmount;
}
